<?php
/**
 * 公共常量
 */
namespace App\Models;

class ConstCodeArray
{

    /**
     * getEscortPayStatusName
     * @param $status
     * @return string
     * @author: Tinymeng <666@majiameng.com>
     * @time: 2022/4/25 9:46
     */
    static public function getPayStatusName($status){
        $data=array (
            ConstCode::PAY_STATUS_NO => '未支付',
            ConstCode::PAY_STATUS_YES => '支付成功',
            ConstCode::PAY_STATUS_REFUND => '退款成功',
        );
        return isset($data[$status]) ? $data[$status] : "";
    }

    /**
     * getPaymentName
     * @param $status
     * @return string
     * @author: Tinymeng <666@majiameng.com>
     * @time: 2022/4/25 9:46
     */
    static public function getPaymentMethodName($status){
        $data=array (
            ConstCode::PAYMENT_CASH => '现金',
            ConstCode::PAYMENT_ALIPAY => '支付宝',
            ConstCode::PAYMENT_WECHAT => '微信',
        );
        return isset($data[$status]) ? $data[$status] : "";
    }

    /**
     * getPaymentName
     * @param $status
     * @return string
     * @author: Tinymeng <666@majiameng.com>
     * @time: 2022/4/25 9:46
     */
    static public function getMethodName($status){
        $data=array (
            'mp' => '扫二维码',//公众号支付
            'web' => '电脑网站支付',
            'miniapp' => '小程序支付',
            'h5' => '扫二维码',//手机网站支付
            'mini' => '小程序支付',
            'offline' => '线下支付',
            'pos' => '扫收款码',//刷卡支付
        );
        return isset($data[$status]) ? $data[$status] : "";
    }

    /**
     * getRoleTypeName
     * @param $payment
     * @return string
     * @author: Tinymeng <666@majiameng.com>
     * @time: 2022/4/25 9:46
     */
    static public function getPayMent($payment){
        $data=array (
            ConstCode::PAYMENT_WECHAT => 'wechat',
            ConstCode::PAYMENT_ALIPAY => 'alipay',
        );
        return isset($data[$payment]) ? $data[$payment] : "";
    }

}
